-- GENERATED SPELL FOR [Rotting Abomination] --


function spell0_28023(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28023', 540, 1)
end

function spell1_28023(pUnit, Event) --@Scourge Hook,n/a--
pUnit:FullCastSpellOnTarget(50335,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28023', 1000, 1)
end

function Sorts_28023(pUnit, Event)
local choix_sorts_28023 = math.random(0, 1)
if choix_sorts_28023 == 0 then
pUnit:RegisterEvent('spell0_28023', 1, 1)
end
if choix_sorts_28023 == 1 then
pUnit:RegisterEvent('spell1_28023', 1, 1)
end
end

function mob28023_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28023', math.random(1500, 3000), 1)
end

function mob28023_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28023_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28023_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28023, 1, 'mob28023_Action')
RegisterUnitEvent(28023, 2, 'mob28023_Leave')
RegisterUnitEvent(28023, 3, 'mob28023_Kill')
RegisterUnitEvent(28023, 4, 'mob28023_Die')
